package com.czt.mail.redis;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * @author czt
 * @version 1.0
 * {@desc}
 * @date 2024/8/2 14:53
 */
//消费者  需要实现MessageListener
@Component
public class Sub1 implements MessageListener {
    @Override
    public void onMessage(Message message, byte[] pattern) {
        System.out.println("管道："+message.getChannel().toString()+"-消息:"+message+new String(pattern));
    }
}
